#! /bin/sh

which perl || exit 1
which grep || exit 1
which sed  || exit 1

echo
for f in *.c; do
  [ "$f" = "ngx_javascript_module_file.c" ] && continue
  [ "$f" = "ngx_javascript_module_mysql.c" ] && continue
  [ "$f" = "ngx_javascript_module_sqlite.c" ] && continue
  cat "$f" | perl -ne 'print if m,^[a-zA-Z].* {,' | grep -v '=' | sed -e 's, {$,;,'
done
